<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Student's Sleep Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>

<table width="100%" summary="page for sleep"><tr><td>sleep</td><td align="right">R Documentation</td></tr></table>

<h2>Student's Sleep Data</h2>

<h3>Description</h3>


<p>Data which show the effect of two soporific drugs (increase in hours
of sleep compared to control) on 10 patients.
</p>


<h3>Usage</h3>

<pre>sleep</pre>


<h3>Format</h3>


<p>A data frame with 20 observations on 3 variables.
</p>

<table summary="Rd table">
<tr>
 <td align="right">
    [, 1] </td><td align="left"> extra </td><td align="left"> numeric </td><td align="left"> increase in hours of sleep</td>
</tr>
<tr>
 <td align="right">
    [, 2] </td><td align="left"> group </td><td align="left"> factor  </td><td align="left"> drug given</td>
</tr>
<tr>
 <td align="right">
    [, 3] </td><td align="left"> ID    </td><td align="left"> factor  </td><td align="left"> patient ID
  </td>
</tr>

</table>



<h3>Details</h3>


<p>The <code>group</code> variable name may be misleading about the data:
They represent measurements on 10 persons, not in groups.

</p>


<h3>Source</h3>


<p>Cushny, A. R. and Peebles, A. R. (1905)
The action of optical isomers: II hyoscines.
<EM>The Journal of Physiology</EM> <B>32</B>, 501&ndash;510.
</p>
<p>Student (1908)
The probable error of the mean.
<EM>Biometrika</EM>, <B>6</B>, 20.
</p>


<h3>References</h3>


<p>Scheffé, Henry (1959)
<EM>The Analysis of Variance</EM>.
New York, NY: Wiley.
</p>


<h3>Examples</h3>

<pre>
require(stats)
## Student's paired t-test
with(sleep,
     t.test(extra[group == 1],
            extra[group == 2], paired = TRUE))
</pre>


</body></html>
